package com.springcloud.demo.service;

import com.springcloud.demo.pojo.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;


/**
 * @Author: XiaoJie Wang
 * @Description:
 * @Date: Create in 9:33 2021/7/16
 */

// 声明需要调用的服务
@FeignClient(value = "service-provider",fallbackFactory = ProductServiceFallbackFactory.class)
public interface ProductService {



    /**
     * 根据主键查询商品
     *
     * @return
     */
    @GetMapping("/product/{id}")
    Product selectProductById(@PathVariable("id") Integer id);


}

